package com.htc.model;

public class InternalResponse {
	private String code;
    private Object body;
    
    public InternalResponse() {
		super();
	}

	public InternalResponse(String code) {
		super();
		this.code = code;
	}

	public InternalResponse(String code, Object body) {
		super();
		this.code = code;
		this.body = body;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public Object getBody() {
		return body;
	}

	public void setBody(Object body) {
		this.body = body;
	}

	public static InternalResponse success() {
        return new InternalResponse("01", null);
    }

    public static InternalResponse success(String code) {
        return new InternalResponse(code, null);
    }

    
    public static InternalResponse fail() {
        return new InternalResponse("02", null);
    }

    public static InternalResponse fail(String code) {
        return new InternalResponse(code, null);
    }
    
    public InternalResponse withBody(Object body) {
        this.body = body;
        return this;
    }

}
